﻿@using E5_KhuyenMaiVang.Models;
@model IEnumerable<MEMBER>
@{
    ViewBag.Title = "TV_QuanLy";
    Layout = "~/Views/Shared/_LayoutAdmin.cshtml";
    int nMember = Model.Count();
    var VouchersBuy = ViewBag.VouchersBuy;
    var VouchersPay = ViewBag.VouchersPay;
    var MoneyPay=ViewBag.MoneyPay;
}

@section menu
{
    <h3>Admin</h3>
    <ul class="nav">       
          <li><a href="@Url.Action("TV_QuanLy","Admin")"  style="text-decoration:underline; font-weight:bold;" >Quản lý thành viên</a></li>
          <li><a href="@Url.Action("TV_Them","Admin")">Thêm thành viên</a></li>
   </ul>
}


<div class="top-bar">
    <a href="#" class="button">ADD NEW </a>
    <h1>THÀNH VIÊN</h1>
    <div class="breadcrumbs"><a href="#">Thành viên</a> / <a href="#">Quản lý thành viên</a></div>
</div>
<form  method="post" action="@Url.Action("SearchTV_QuanLy", "Admin")">
<div class="select-bar">
    <label>
        <input type="text" name="MemberName" value="@ViewBag.SearchName" />
    </label>
    <label>
        <input type="submit" name="Submit" value="Search" />
    </label>
</div>
</form>
<div class="table">
    <table class="listing" cellpadding="0" cellspacing="0">
        <tr>
            <th>Số thứ tự</th>
            <th>Số voucher đã mua</th>
            <th>Số voucher đã thanh toán</th>
            <th>Số tiền đã thanh toán</th>
            <th>Email</th>
            <th>Tên đăng ký</th>                            
            <th>Điện thoại</th>
            <th>Địa chỉ</th>
            <th></th>
        </tr>
        @for(int i = 0;i<nMember;i++)
        {
            MEMBER member = Model.ElementAt(i);
        <tr>
            <td class="style1">@(i+1)</td>
            <td>@VouchersBuy[i]</td>
            <td>@VouchersPay[i]</td>
             <td>@MoneyPay[i]</td>
            <td>@member.Email</td>
            <td>@member.MemberName</td>
            <td>@member.Phone</td>
            <td>@member.Address</td>
            <td><a href="@Url.Action("DeleteTV_QuanLy", "Admin", new { MemberID = @member.MemberID })" style="text-decoration:none;"><img src="../Images/hr.gif" width="16" height="16" alt="" /></a></td>
        </tr>
        }                        
    </table>
                   
</div>
          
